package realdance.swing.outline;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Insets;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import javax.swing.border.Border;

public class J14_BorderLayout extends JFrame{
	public J14_BorderLayout(){
	setDefaultLookAndFeelDecorated(true);
	setTitle("BorderLayout - 5개 구역에 나눠 배치");
	setLayout(new BorderLayout(7,7));
	setBounds(300, 300, 450, 300);
	
	JButton btn1 = new JButton(" 버튼 1 ");
	JButton btn2 = new JButton(" 버튼 2 ");
	JButton btn3 = new JButton(" 버튼 3 ");
	JButton btn4 = new JButton(" 버튼 4 ");
	JButton btn5 = new JButton(" 버튼 5 ");
	add(btn1,BorderLayout.NORTH);
	add(btn2,BorderLayout.EAST);
	add(btn3,BorderLayout.WEST);
	add(btn4,BorderLayout.SOUTH);
	add(btn5,BorderLayout.CENTER);
	setVisible(true);
	
	}
		
	public static void main(String[] args){
		SwingUtilities.invokeLater(new Runnable() {
			
			@Override
			public void run() {
				new J14_BorderLayout();
}
});
}
}
